package com.lu.statistics.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lu.statistics.entity.RCustomer;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface RCustomerMapper extends BaseMapper<RCustomer> {
    /**
     * 统计客户电话数量
     *
     * @param phone
     * @return
     */
    public int queryCustomerPhone(@Param("phone") String phone);

    /**
     * 查询预定客户数量
     *
     * @param status
     * @return
     */
    public int queryBookingCustomerCount(@Param("customerId") Integer customerId, @Param("status") String status, @Param("bookingRoom") String bookingRoom, @Param("startTime") String startTime);

    /**
     * 查询个人资料
     * @param createId
     * @return
     */
    public RCustomer queryCustomerByCreateId(@Param("createId") Integer createId);

    /**
     * 按预定礼厅查询最新的结束时间
     *
     * @param bookingRoom
     * @param endTime
     * @return
     */
    public Date queryMaxEndTimeByRoom(@Param("bookingRoom") String bookingRoom,@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 查询订单客户列表
     *
     * @param status
     * @return
     */
    public List<RCustomer> queryOrderCustomerList(@Param("status") String status);
}
